<?php

namespace App\Models\Base;

// use Illuminate\Database\Eloquent\Model;

use App\Models\BaseModel;

class Message extends BaseModel
{
				protected $table = 'bas_message';

	//接收会员
	public function member()
	{
		return $this->belongsTo(Member::class);
	}

	//发送会员
	public function sender()
	{
		return $this->belongsTo(Member::class,'sender_id');
	}

	public function scopeNoread()
	{
		return $this->where([['is_read',0],['is_read',1]]);
	}

}